package org.jeecg.modules.travel.enums;

import lombok.Getter;

@Getter
public enum FileTypeEnum {

    IMG(0,"图片"),
    MP(1,"音频"),
    VIDEO(2,"视频");

    private final Integer value;

    private final String text;

    private FileTypeEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

    public static String getByText(Integer value) {
        for (FileTypeEnum typeEnum : FileTypeEnum.values()) {
            if (typeEnum.getValue().equals(value)) {
                return typeEnum.getText();
            }
        }
        return null;
    }

}
